package com.yitiao.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Service
@FeignClient(
        path = "/commerce-user",
        name = "cloud-commerce-user",
        url = "localhost:6001",
        fallback = FeignFallback.class)
public interface UserFeignClient {
    @GetMapping(value = "/user/findById")
    String getUserById(@RequestParam("id") String id);
}
